home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / run123.com / README < prev    next >
Encoding:
Text File  |  1989-03-16  |  7.2 KB  |  159 lines

  1.  ═══════════ Turbo 4.0/5.0 subprocess demonstration package ════════════
  2.  
  3.    TP-123                 3/16/89                Richard W. Prescott
  4.  
  5.    This package illustrates a method for writing TP4/5 interrupt 
  6.    routines to modify the behavior of an existing program which 
  7.    is executed as a subprocess.  The interrupt hook and return 
  8.    procedures are written in assembly language, however the 
  9.    remainder of the application can be written entirely in Pascal, 
  10.    and can Chain or Return from Interrupt from any point in the 
  11.    Pascal Code.  All source code is provided, and all assembly 
  12.    source code is contained in the Units T5DOS and INTR16 which are 
  13.    provided in both source and compiled form.  Users without an 
  14.    assembler can redesign everything but the interrupt hook and 
  15.    return procedures.
  16.  
  17.    Files provided in this package:
  18.  
  19.    README         (This file)
  20.    INTR16.PAS     Interrupt Unit (Pas/Asm Source)
  21.    INTR16.TPU     Interrupt Unit (Compiled w Turbo Version 4.0)
  22.    INTR16.TP5     Interrupt Unit (Compiled w Turbo Version 5.0)
  23.    T5DOS.PAS      Implements Turbo 5.0 DOS Routines (Pas/Asm Source)
  24.    T5DOS.TPU      Implements Turbo 5.0 DOS Routines (Compiled w Turbo 4)
  25.    RUN123.PAS     Program to Run 123 as a subprocess (Pascal Source)
  26.    RUN123.EXE     Program to Run 123 as a subprocess (Compiled)
  27.  
  28.  
  29.    The sample interrupt Unit provided installs an interrupt handler 
  30.    for Interrupt $16 (BIOS Keyboard Services).  Routines are 
  31.    provided to return (IRET) to the calling program or to Chain to 
  32.    the next program in the interrupt chain.  These routines can be 
  33.    invoked from any point in the Pascal service routine.  Simple and 
  34.    obvious modifications can be made to the interrupt unit to create 
  35.    handlers for other interrupts.  
  36.  
  37.  
  38.    The program RUN123 provides a concrete example of a program which 
  39.    uses the INTR16 Interrupt Unit to modify the behavior of a 
  40.    subprocess.  It can be used to run 123.COM, load a designated 
  41.    worksheet, and execute a series of keyboard entries (eg: printing 
  42.    a range, or executing a macro) as specified on the RUN123 command 
  43.    line.  The Pascal code can be easily modified to enable similar
  44.    batch style execution (via command line parameters) of other 
  45.    keyboard oriented programs.  
  46.  
  47.    The command line should consist of a series of blocks of ordinary 
  48.    printable characters, 123 Alt-Letter commands (eg "\A") and 123 
  49.    macro commands ( {right}, {home}, {name}, etc ), separated by 
  50.    spaces.  (Spaces are required between macro and Alt- commands, 
  51.    and are optional between ordinary characters.  It is not possible 
  52.    to specify a space as a keyboard entry).  Carriage returns should 
  53.    be specified using the 123 symbol "~".  
  54.  
  55.    If RUN123 finds an error on the command line it will terminate 
  56.    (without executing 123) and set the DOS ErrorLevel to 2.  Use
  57.    "IF ErrorLevel" as described in your DOS Manual to test for 
  58.    successful execution within a batch file.
  59.  
  60.    If the first parameter does NOT begin with a "/" menu command, it 
  61.    is interpreted as a file to be loaded.  Thus:
  62.  
  63.                             Run123 MyWks
  64.    is the same as:
  65.                         Run123 /fr MyWks.wk1 ~
  66.  
  67.    Other Examples:
  68.  
  69.    To load MYWKS.WK1, execute the print macro Alt-P, and exit:
  70.  
  71.                         Run123 MyWks \p /qy
  72.  
  73.    To load MYWKS.WK1 and display a full screen list of range names 
  74.    to go to:
  75.  
  76.                  Run123 MyWks {goto} {name} {name}
  77.  
  78.    To run 123 and display a full screen list of files to load from 
  79.    the directory C:\MYDIR:
  80.  
  81.              Run123 /wgdd {esc} C:\MYDIR ~q /fr {name}
  82.  
  83.  
  84.    Please refer to RUN123.PAS for a complete list of the supported 
  85.    123 macro keys.  
  86.  
  87.    Note that RUN123 could not be written using the built-in 
  88.    "Interrupt Procedure" provided in Turbo version 4/5, since it 
  89.    does not provide for chaining to the previous interrupt vector.  
  90.  
  91.  
  92.    The Units T5DOS and INTR16 were compiled and assembled using 
  93.    Turbo Pascal Version 4.0 and TP&Asm Version 2 ß.  TP&Asm provides 
  94.    an integrated compile-time assembler within the Turbo development 
  95.    environment (and the command line compiler TPC).  The result is an 
  96.    ASSEMBLY Development Environment which is identical to your PASCAL 
  97.    Development Environment, and which allows you to mix assembly 
  98.    language sections freely within your Pascal code and to make 
  99.    simplified assembly references to all Pascal variables.  It 
  100.    provides fast assembly with no additional disk access, and reports 
  101.    assembly syntax errors on the standard Turbo error line with 
  102.    cursor placed on the error.  It accepts the standard syntax of 
  103.    both MASM and A86, but also provides certain enhancements such as 
  104.    the placement of named data in the Code Segment which is used in 
  105.    the interrupt unit INTR16.  
  106.  
  107.    TP&Asm Version 2.0 will be available from me for $49 plus $3 P&H.  
  108.    The current Beta Test Version 2 ß is available now for $39 plus $3 
  109.    P&H, with a free upgrade to 2.0 when it becomes available.  
  110.  
  111.    A shareable Memory Mode version called TP&Asm-M is also available.  
  112.    TP&Asm-M provides the same assembly language capabilities as TPA, 
  113.    but is intended only for assembly language development within the 
  114.    Turbo 4.0 or 5.0 integrated environments, and therefore does not 
  115.    have the capability of compiling to disk.  (You can of course read 
  116.    and save Pascal and Assembly SOURCE files with both programs).  
  117.  
  118.    The TP&Asm-M distribution disk can be ordered from me for $5 plus 
  119.    $3 P&H, with the $5 being credited toward subsequent registration 
  120.    of TP&Asm or TP&Asm-M.  It can also be downloaded from the IBMPRO 
  121.    or BPROGA forums on CompUServe.  Look for TPA2-A.ARC and TPA2-R.ARC.
  122.  
  123.  
  124.    To order TP&Asm, please send a check or money order payable to:
  125.  
  126.                          Richard W. Prescott
  127.                          724 Sauk Ridge Trail
  128.                          Madison, WI  53705
  129.  
  130.    Please include the following information:
  131.  
  132.    1. Full Version number of the Turbo Pascal compiler you now use.
  133.  
  134.    2. Your registration number for that compiler.
  135.  
  136.    3. If you obtained TP&Asm-M from a bulletin board:
  137.       3a. Area code and phone number of that bulletin board
  138.       3b. Full Version number of the TP&Asm-M version you have
  139.       3c. Directory Date of the README file
  140.  
  141.  
  142.    The source and compiled code in this package is copyrighted as 
  143.    indicated.  You may share this package and/or upload it to 
  144.    bulletin boards as long as no fee is charged.  You may of course 
  145.    make modifications to these programs for your own use, and you may 
  146.    distribute these modifications with the package.  The original 
  147.    unmodified files must all be present.  
  148.  
  149.    Registered owners of TP&Asm may distribute programs using any of 
  150.    the source code or compiled units in this package in original or 
  151.    modified form.  Please give appropriate credit.  
  152.  
  153.    If you distribute programs written using TP&Asm, please help me 
  154.    spread the word by including a statement like the following: 
  155.  
  156.           This program was compiled and assembled using 
  157.          Turbo Pascal Version xxx and TP&Asm Version yyy.  
  158.  
  159.